import sys

print(sys.argv)
print(sys.argv[1:])
print(sys.path)
# sys.exit(0)
print("---------------------------- time")
import time

start = time.time()
# time.sleep(2)
end = time.time()
print(end, end - start)

print("---------------------------- datetime")
from datetime import datetime
now = datetime.now()
print(now.year, now.month, now.day)
strftime = datetime.strftime(now, "%Y-%m-%d %H:%M:%S")
cur_time = datetime.strptime("2023-06-02 13:16:49", "%Y-%m-%d %H:%M:%S")

print("----------------------------")
aaa = [2, 4, 1, 2, 3, 6]
print(max(aaa))
print(min(aaa))
print(sum(aaa))
print(len(aaa))
print(sorted(aaa))
print(sorted(aaa, reverse=True))
print(aaa)

print("----------------------------math")
import math
# 幂
print(math.pow(10, 2))
# 向下取整
print(math.floor(1.8234234234234))
# 向上取整
print(math.ceil(1.1234234234234))
# 四舍五入
print(round(1.6234234234234))

# sin  传入弧度值  pi 3.1416 180度
print(math.sin(1.5708))

print("------------------------------")
import random

# 随机整数
print(random.randint(10, 20))
# 随机小数 [0, 1)
print(random.random())
# 随机浮点类型数据
print(random.uniform(1.3, 8.5))

# 从列表中随机获取元素
lst = [10, 20, 30, 123, 345, 567]
print(random.choice(lst))

# 随机返回列表 返回单个元素的列表
print(random.choices(lst))
